﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebApplication2.Handler
{
    /// <summary>
    /// HandlerData 的摘要说明
    /// </summary>
    public class HandlerData : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string funC = context.Request["func"];
            try
            {
                switch (funC)
                {
                    case "year":
                        yearV(context);
                        break;
                    case "query":
                        seasonV(context);
                        break;
                    case "delete":
                        mouthV(context);
                        break;
                    default:
                        context.Response.Write("{data:\"参数错误！\"}");
                        Console.WriteLine("傻逼,参数错误！");
                        break;
                }
            }
            catch (Exception e)
            {
                context.Response.ClearContent();
                context.Response.Write(e.ToString());
            }
        }

        private void mouthV(HttpContext context)
        {
            string sql = String.Empty;


        }

        private void seasonV(HttpContext context)
        {
          
        }

        private void yearV(HttpContext context)
        {
         
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}